/**
 * Created by Administrator on 2017/8/31.
 */
withdraw = function ($scope, $ducTools, $compile, $get, http, $dataTableSet) {
    'use strict';
//这个是用的DataTable插件
    var withdrawTable = $('#withdrawTable').DataTable({
        //请求ajax：java的地址serverUrl+apiUrl
        sAjaxSource: 'customer/withdraw',
        fnServerData: $ducTools.retrieveData,
        //向服务器请求时候，发送额外的数据给服务器
        fnServerParams: function (aoData) {
            aoData.push(
                {"name": "wdName", "value": $scope.wdName},
                {"name": "withdrawStartTime", "value": $("#withdrawStartTime").val()},
                {"name": "withdrawEndTime", "value": $("#withdrawEndTime").val()},
                {"name": "wdAddress", "value": $scope.wdAddress}
            )
        },
        //请求的数据，并生成列
        columns: [
            {"data": "wdName"},
            {"data": "wdPhone"},
            {"data": "wdMoney"},
            {"data": "wdTime"},
            {"data": "wdAddress"},
        ],
        createdRow: function (row, data, dataIndex) {
            $compile(row)($scope);
        }
    });

    $dataTableSet.dataTableRowShow('withdrawTable');
    //当点击查询的时候，重新绘制表格
    $scope.withdrawListDraw = function () {
        withdrawTable.draw();
    }
}
/**
 * Created by Administrator on 2017/8/31.
 */
